﻿let $student_score_table;

window.onload = function () {
  initStudentScore();
}

var student_score_test_data = {
  total: "6",
  rows: [{
    cour_title: "计算机组成原理",
    ultimate_grade: "99",
  }, {
    cour_title: "C++程序设计",
    ultimate_grade: "99",
  }, {
    cour_title: "Java程序设计",
    ultimate_grade: "99",
  }, {
    cour_title: "PHP程序设计",
    ultimate_grade: "99",
  }, {
    cour_title: "Go程序设计",
    ultimate_grade: "99",
  }, {
    cour_title: "Vue程序设计",
    ultimate_grade: "99",
  },]
}



//显示成绩表格
function initStudentScore() {
  $student_score_table = $('#student-score-table').bootstrapTable({
    url:"cotro/student/getAllCourseScore.ashx",
    method:"post",
    //data: student_score_test_data.rows,
    search: true,
    striped: true,
    searchAlign:"left",
    sidePagination: "client",
    pageList: [5, 25, 50, 100],
    pagination: true,
    height: 450,
    singleSelect: false,
    contentType: "application/x-www-form-urlencoded; charset=UTF-8",
    queryParams: function (params) {
      params.stu_id = $.cookie('indiv_id');
      //params.stu_id = 10012;
      return params;
    },
    columns: [{
      field: "cour_title",
      title: "课程名称"
    }, {
      field: "ultimate_grade",
      title: "最终成绩"
    },]
  });
}